Neural Network based Closed loop Speed Control of DC Motor using Arduino Uno

نویسندگان

  • Neerparaj Rai
  • Bijay Rai
چکیده

This paper presents the design and implementation of Arduino Uno based DC motor speed control system using Multilayer Neural Network controller and PID controller. A model reference structure is developed using PID control to obtain the neural controller .The artificial neural network is trained by Levenberg-Marquardt back propagation algorithm. Feed forward neural network with two hidden neurons and one output neuron is used. Speed of the dc motor is controlled by varying the duty cycle of the pwm signal which is fed to the gate of the mosfet irf 640. Simulation and practical results are presented to demonstrate the effectiveness and advantage of the control system of DC motor with ANNs in comparison with the conventional control scheme in Matlab/Simulink R2009b. PID algorithm and ANN controller is implemented in Arduino Uno because of its easy compatibility and portability. Keywords—DC motor, Arduino, Artificial neural networks, Atmega 168. Introduction DC motors are one of the most widely prime movers in industry today. There are many ways for DC motor speed control such as Proportional-Integral-Derivative (PID) control, state space control, digital PID control and others. However, Artificial Neural Networks (ANN) have emerged as a tool for difficult control problems of unknown non-linear systems. Neural networks are used for modelling and control of complex physical systems because of their ability to handle complex input output mapping without detailed analytical models of the systems. There are several control strategies for neural networks such as: 1) Feed forward control, 2) Direct inverse control (extracting inverse dynamics), 3) Indirect adaptive control method based on NN identification, 4) direct adaptive control with guarantied stability, 5) Feedback linearization, 6) Predictive control [1]. In the direct inverse control method, a MNN is trained by specialized back-propagation algorithm [2]. This method has attracted much attention in recent years because it is intuitive, and simple to be implemented [3]. However, the plant to be controlled may not have a unique or stable inverse, which is the drawback of direct inverse dynamics method. In this study, a control strategy is proposed for the real time control of single-input single-output linear and nonlinear systems. The proposed method resembles previous two methods mentioned before: model reference direct inverse control and indirect adaptive control. The proposed method uses Levenberg-Marquardt back-propagation training algorithm and is desired to track a reference model. The method can be considered as a direct controller design. Although it does not require any knowledge of the system dynamics, it requires the sensitivity of the controlled system. This paper describes a method of implanting a fully connected multi-layer neural network with multi-layer connections on a very inexpensive Atmega 168 microcontroller I. DC MOTOR CONTROL WITH ANN A dc motor is widely used for control purposes because of its stability and straight forward characteristics. For effective analytical purposes, mathematical models are indispensable. The separately excited dc motor is the simplest of all dc motors and it is the one most commonly found in industrial applications. A. Mathematical model of DC motor: The separately excited DC motor is described by the following equations: KFωp(t) = – Raia(t) – La[dia(t)/dt] + Vt(t) (1) KFia (t) = J[dωp(t)/dt] + Bωp (t) + TL(t) (2) where, ωp(t) rotor speed (rad/s) Vt (t) terminal voltage (V) ia(t) armature current (A) TL(t) load torque (Nm) J rotor inertia (Nm2) KF torque & back emf constant (Nm/A) B viscous friction coefficient (Nms) Ra armature resistance (Ω) La armature inductance (H) From these equations mathematical model of the DC motor can be created. The model is presented in Fig1. Where, Ta -Time constant of motor armature circuit, Ta=La/Ra(s) and, Tm – Mechanical time constant of the motor Tm=J/B (s). International Journal of Engineering Trends and TechnologyVolume4Issue22013 ISSN: 2231-5381 http://www.internationaljournalssrg.org Page 138 Fig. 1 The mathematical model of separately excited dc motor. B. PI control method: Firstly, for controlling the speed of DC motor PI control strategy is applied. The block diagram for the PI control is developed in Matlab/Simulink and the transfer function for the PI control is obtained using Ziegler-Nicholas method. Fig. 2 Simulink model for PI controlled dc motor. There are different methods to synthesize control systems of DC motor, but for a comparison with method using ANNs, a conventional PI control of DC motor is used. The plant obtained in fig2 is used as the reference model to obtain the input and target samples. C. The control system of DC motor using ANNs: A neural network comprises simple elements operating in parallel. In fact, it is a massively parallel distributed processor that stores experiential knowledge and makes it available for use when needed. In using neural networks for system identification, training data can be obtained by observing the input-output behaviour of a plant. If previous values of the input and output are present, the future value can be predicted as: y(k+1)=f[y(k), y(k-1), ....,y(k-na), u(k), u(k-1), ....,u(k-nb)] (3) This process is called as “one step ahead prediction” and the structure is called Time Delayed Neural network. Equation (3) can be easily implemented [6]. In this paper, the ANN controller is time delayed neural network. The proposed method can be used as adaptive or non-adaptive controller. If learning process continues, the controller will be an adaptive controller. In non-adaptive case, learning process is executed as offline or for a certain period of time. In designing and training an ANN to emulate a function, the only fixed parameters are the number of inputs and outputs of the ANN, which are based on the input/output variables of the function. The choice of the number of hidden neurons is based on experience. It is also widely accepted that maximum of two hidden layers are sufficient to learn any arbitrary non-linearity. The back-propagation training technique adjusts the weights and bias in all connecting links in the nodes so that the difference between the actual output and target output are minimized for all given training patterns.[2] The diagram of neural network used in the control of DC motor is shown in figure 3. The time delayed neural network is a multilayer neural network and has four inputs. The MNN has one hidden layers, which consist of 2 neurons with tan sigmoid activation function. The output layer of the NN has only one neuron with pure linear activation function. Fig. 3 ANN control schema for dc motor. The network is trained for 500 second applying a 0.2 Hz square wave to the reference model. The load was 10gm-cm during training. The architecture of the proposed ANN controller in MATLAB Simulink is shown in Fig. 4. International Journal of Engineering Trends and TechnologyVolume4Issue22013 ISSN: 2231-5381 http://www.internationaljournalssrg.org Page 139 Fig. 4 Architecture of the proposed ANN controller in MATLAB Simulink. D. Implementation in Arduino Uno Fig.5 shows the block diagram of Design and Implementation of Arduino Uno Based Speed Control of DC Motor. The input for the set speed is given through GUI built in MATLAB. The data processing unit contains Arduino Microcontroller Atmega 168 unit. The DC motor driver circuit is a mosfet which is configured as a switch and it is driven from the microcontroller PWM 0 output. The DC motor module consists of speed sensing unit and DC motor. Speed sensing unit consists of an opto coupler MOC7811 and an optical encoder, which will give train of pulses with some frequency depending upon the speed of the motor. The DC motor used is less weight, low power consumption and high speed etc. The lifetime of the motor may vary from a few hundred hours to more than 10, 000 hours. The specifications of DC motor used in the present study are shown in Table 1.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Numerical and Neural Network Modeling and control of an Aircraft Propeller

In this paper, parametric and numerical model of the DC motor, connected to aircraft propellers are extracted. This model is required for controlling trust and velocity of the propellers, and consequently, an aircraft. As a result, both of torque and speed of the propeller can be controlled simultaneously which increases the kinematic and kinetic performance of the aircraft. Parametric model of...

متن کامل

Performance Improvement of Direct Torque Controlled Interior Permanent Magnet Synchronous Motor Drives Using Artificial Intelligence

The main theme of this paper is to present novel controller, which is a genetic based fuzzy Logic controller, for interior permanent magnet synchronous motor drives with direct torque control. A radial basis function network has been used for online tuning of the genetic based fuzzy logic controller. Initially different operating conditions are obtained based on motor dynamics incorporating...

متن کامل

Artificial Neural Network based Speed Control of Bidirectional Chopper fed Induction Motor Drive using DFRT Theory

In this paper, a new simulink model for a single phase induction motor is proposed using double field revolving theory. To maintain a constant fluid flow with a variation in the pressure head, drives like Fan load and Pump load are operated with closed loop speed control. For non linear loads, closed loop speed control is achieved using a neural network controller. A comparative study has been ...

متن کامل

Design and PLC Implementation for Speed Control of DC Motor using Fuzzy Logic

In this article, a speed control of DC motor is designed and illustrated using fuzzy logic-based programmable logic controller (PLC). The DC motor is an attractive part of electrical equipment in many industrial applications requiring variable speed and load specifications due to its ease of controllability. The designed system is consisted of three main parts including programmable logic contr...

متن کامل

A Neural Network-PSO Based Control for Brushless DC Motors for Minimizing Commutation Torque Ripple

This paper presents the method of reducing torque ripple of brushless DC (BLDC) motor. The commutation torque ripple is reduced by control of the DC link voltage during the commutation time. The magnitude of voltage and commutation time is estimated by a neural network and optimized with an optimization method named particle swarm optimization (PSO) algorithm analysis. The goal of optimizati...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2013